package com.example.myprojectoffeixue;

import android.content.Context;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * Created by ASUS on 2016/9/5.
 */
public class MyGridView extends GridView {

//为了解决ScrollView嵌套GridView时显示不全的问题；
    public MyGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        // TODO 自动生成的方法存根
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }



}
